package edu.aysf.service;

import edu.aysf.service.fallback.ClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import reactor.core.publisher.Mono;

// 微服务内部调用
// 一个微服务对应1个feignclient的写法
//@FeignClient(name = "order-service", fallback = ClientFallback.class)
//@FeignClient(name = "order-service",path="/")
// 一个微服务对应2个feignclient的写法，同时配置文件中配置order-service.url=http://localhost:8081
//@FeignClient(name = "order-service",contextId = "OrderService1",url = "${order-service.url}")
//@FeignClient(name = "order-service",contextId = "OrderService1",url = "http://localhost:9000")
public interface CalcService {
    @RequestMapping("/order/calc")
    String mycalc(@RequestParam("p1") int par1, @RequestParam("p2") int par2);
}
